<extend name="Base:base"/>
<block name="header"></block>
<block name="footer">
    <script>
        $(document).ready(function () {
            $("#getcode").on("click", function () {
                $.ajax({
                    url: "{$data['root']}/account/code/",
                    type: "POST",
                    data: {
                        number: $("#account").val()
                    },
                    success: function (data) {
                        alert(data);
                    }
                });
            });
            $("#submit").on("click", function () {
                if ($("#password").val() != $("#repassword").val()) {
                    alert("两次密码输入不同");
                    return;
                }
                $.ajax({
                    url: "{$data['root']}/account/ajaxSignup/",
                    type: "POST",
                    dataType: "JSON",
                    data: {
                        account: $("#account").val(),
                        password: $("#password").val(),
                        code: $("#code").val()
                    },
                    success: function (data) {
                        alert(data.message);
                        if (data.code == "1") {
                            window.location.href = "{$data['root']}/";
                        }

                    }
                });
            });
        });
    </script>
</block>
<block name="main">
    <div class="ShareAnyContainer" style="font-size: 14px;">
        当前位置：<a href="{$data['root']}/" title="首页">首页</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a
            href="{$data['root']}/account/signup/" title="注册">注册</a>
    </div>
    <div class="ShareAnySeparate"></div>
    <div class="ShareAnyContainer">
        <div class="line"></div>
    </div>
    <div class="ShareAnySeparate"></div>
    <div class="ShareAnyContainer form" style="line-height: 50px; text-align: center;">
        <style>
            .form input{
                width:300px;
                padding:5px;
            }
            .form input:focus{
                border:1px solid #ff0000;
            }
            .signup_now{
                 padding:5px 20px;
                 background-color: #0b6fa2;
                 color:#fff;
                border-bottom:3px solid #0b6fa2;
             }
            .signup_now a{
                color:#fff;
            }
            .signup_other{
                border-bottom:3px solid #0b6fa2;
                padding:5px 20px;
            }

        </style>
        <p><span class="signup_now"><a
                href="{$data['root']}/account/signup/" title="手机注册">手机注册</a></span><span class="signup_other"><a
                href="{$data['root']}/account/signupemail/" title="邮箱注册">邮箱注册</a></span></p>
        <p>手机号码：<input type="text" id="account"></p>

        <p>
            <button id="getcode" style="padding:10px 81px;">获取验证码</button>
        </p>
        <p>验证码：&nbsp;&nbsp;&nbsp;<input type="text" id="code"></p>
        <p>登录密码：<input type="password" id="password"></p>

        <p>确认密码：<input type="password" id="repassword"></p>



        <p>
            <button id="submit" style="padding:10px 25px;">同意网站会员注册协议并注册</button>
            <br><a target="_blank" href="{$data['root']}/account/readme/" title="网站会员注册协议">网站会员注册协议</a></p>
    </div>
</block>